package com.lin.fengxiu.model;

import javax.persistence.*;

/**
 * @ClassName ActivityCoupon
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/23 22:39
 * @Version 1.0
 */
@Entity
@Table(name = "activity_coupon", schema = "fengxiu", catalog = "")
public class ActivityCoupon {
    private Integer id;
    private Integer couponId;
    private Integer activityId;

    @Id
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "coupon_id")
    public Integer getCouponId() {
        return couponId;
    }

    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }

    @Basic
    @Column(name = "activity_id")
    public Integer getActivityId() {
        return activityId;
    }

    public void setActivityId(Integer activityId) {
        this.activityId = activityId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ActivityCoupon that = (ActivityCoupon) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (couponId != null ? !couponId.equals(that.couponId) : that.couponId != null) return false;
        if (activityId != null ? !activityId.equals(that.activityId) : that.activityId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (couponId != null ? couponId.hashCode() : 0);
        result = 31 * result + (activityId != null ? activityId.hashCode() : 0);
        return result;
    }
}
